<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>动画-使用第三方类实现动画</title>
    <link rel="stylesheet" href="./lib/animate.css">

    <!-- 入场 bounceIn 离场 bounceOut -->

</head>

<body>
    <div id="app">
        <input type="button" value="切换" @click='flag=!flag'>
        <!-- <transition enter-active-class='animated bounceIn' leave-active-class='animated bounceOut'>
            <h3 v-if='flag'>这是一个h3</h3>
        </transition> -->

        <!-- 使用 :duration='毫秒数' 设置入场和离场时间 -->
        <!-- <transition enter-active-class='bounceIn' leave-active-class='bounceOut' :duration='800'>
            <h3 v-if='flag' class="animated">这是一个h3</h3>
        </transition> -->
        
        <!-- 分别设置入场，出场时间 -->
        <transition enter-active-class='bounceIn' leave-active-class='bounceOut' :duration="{enter:200,leave:800}">
            <h3 v-if='flag' class="animated">这是一个h3</h3>
        </transition>

    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                flag: true,
                flag2: true
            },
            methods: {

            }

        })
    </script>
</body>

</html>